Termination Proof Script
Consider the TRS R consisting of the rewrite rules
|
1: |
|
f(0) |
→ true |
2: |
|
f(1) |
→ false |
3: |
|
f(s(x)) |
→ f(x) |
4: |
|
if(true,x,y) |
→ x |
5: |
|
if(false,x,y) |
→ y |
6: |
|
g(s(x),s(y)) |
→ if(f(x),s(x),s(y)) |
7: |
|
g(x,c(y)) |
→ g(x,g(s(c(y)),y)) |
|
There are 5 dependency pairs:
|
8: |
|
F(s(x)) |
→ F(x) |
9: |
|
G(s(x),s(y)) |
→ IF(f(x),s(x),s(y)) |
10: |
|
G(s(x),s(y)) |
→ F(x) |
11: |
|
G(x,c(y)) |
→ G(x,g(s(c(y)),y)) |
12: |
|
G(x,c(y)) |
→ G(s(c(y)),y) |
|
The approximated dependency graph contains 2 SCCs:
{8}
and {11,12}.
-
Consider the SCC {8}.
There are no usable rules.
By taking the AF π with
π(F) = 1 together with
the lexicographic path order with
empty precedence,
rule 8
is strictly decreasing.
-
Consider the SCC {11,12}.
By taking the AF π with
π(G) = 2,
π(f) = π(g) = π(s) = [ ]
and π(if) = [2, 3] together with
the lexicographic path order with
precedence c ≻ g ≻ if,
f ≻ false,
f ≻ true
and g ≻ s,
the rules in {3,7}
are weakly decreasing and
the rules in {1,2,4-6,11,12}
are strictly decreasing.
Hence the TRS is terminating.
Tyrolean Termination Tool (0.05 seconds)
--- May 4, 2006